package com.crm.customers.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.crm.base.dao.BaseDao;
import com.crm.customers.dao.ContractFilesDao;
import com.crm.customers.model.ContractFiles;

@Repository("contractFilesDao")
public class ContractFilesDaoImpl extends BaseDao implements ContractFilesDao {
	
	private static final String MAPPER_NAMESPACE = "ContractFilesMapper.";

	@Override
	public int deleteByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public ContractFiles insert(ContractFiles c) {
		insert(MAPPER_NAMESPACE+"insert", c);
		return c;
	}

	@Override
	public int insertSelective(ContractFiles record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public ContractFiles selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updateByPrimaryKeySelective(ContractFiles record) {
		return update(MAPPER_NAMESPACE+"updateByPrimaryKeySelective", record);
	}

	@Override
	public int updateByPrimaryKeyWithBLOBs(ContractFiles record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(ContractFiles record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<ContractFiles> getFileListByConid(Long Conid) {
		return selectList(MAPPER_NAMESPACE+"getFileListByConid", Conid);
	}

	@Override
	public ContractFiles getContractFilesByFileId(Long fileid) {
		return selectOne(MAPPER_NAMESPACE+"getContractFilesByFileId", fileid);
	}

	@Override
	public int getFileCountByConid(Long Conid) {
		return selectOne(MAPPER_NAMESPACE+"getFileCountByConid", Conid);
	}

}
